Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Camera-Terrain interaction #1817

Merged
merged 107 commits into from
Jul 18, 2014
Merged

Camera-Terrain interaction #1817

merged 107 commits into from
Jul 18, 2014

Conversation

bagnell
Copy link
Contributor

@bagnell bagnell commented Jun 11, 2014

For #449, #549, and #1060.

  • Default panning now picks the terrain.
  • Modified the default camera tilt mouse behavior to tilt about the point clicked.
  • Added camera collision detection with terrain to the default mouse interaction.
  • Added the following methods to IntersectionTests: rayTriangle, lineSegmentTriangle, raySphere, and lineSegmentSphere.
  • Fixed camera rotation near the camera's constrained axis.
  • Added Globe.getHeight and Globe.pick for finding the terrain height at a given Cartographic coordinate and picking the terrain with a ray.

@pjcozzi
Copy link
Contributor

pjcozzi commented Jul 2, 2014

No need to do this now, but if you think it is worth it, write an issue to middle-mouse rotate in 2D rotate depend on the mouse location like 3D.

@pjcozzi
Copy link
Contributor

pjcozzi commented Jul 2, 2014

  • Run Viewer.
  • Switch to Columbus View.
  • Grab the bottom-left corner of the map. Middle-mouse drag and rotate to get the map to fly up.

@pjcozzi
Copy link
Contributor

pjcozzi commented Jul 2, 2014

No need to do this now, but if you think it is worth it, write an issue to middle-mouse rotate in 2D rotate depend on the mouse location like 3D.

In Columbus view this can be awkward when looking straight down. Have a look and see if there's anything you think we should do.

@pjcozzi
Copy link
Contributor

pjcozzi commented Jul 2, 2014

Middle-mouse tilt went under terrain on my first try in Death Valley:

image

@pjcozzi
Copy link
Contributor

pjcozzi commented Jul 2, 2014

Zoomed in more and we have missing tiles:

image

@pjcozzi
Copy link
Contributor

pjcozzi commented Jul 2, 2014

Browsing around Seneca Rocks, WV is much better.

@pjcozzi
Copy link
Contributor

pjcozzi commented Jul 2, 2014

  • Run Viewer
  • Enable terrain
  • Use the geocoder to zoom to Everest.
  • We end up under terrain. Zoom out and then middle-mouse tilt is backwards.

Not sure that it is the right fix, but fixing #1670 would also fix this.

@pjcozzi
Copy link
Contributor

pjcozzi commented Jul 2, 2014

Run Viewer
Enable terrain
Use the geocoder to zoom to Everest.
We end up under terrain. Zoom out and then middle-mouse tilt is backwards.
Not sure that it is the right fix, but fixing #1670 would also fix this.

Actually just run viewer, zoom to "Nepal", zoom in a bit, and try to tilt and it tilts backwards.

@pjcozzi
Copy link
Contributor

pjcozzi commented Jul 2, 2014

That's all for now. I'll test again and look at the code when ready.

@pjcozzi
Copy link
Contributor

pjcozzi commented Jul 8, 2014

@bagnell any update? We should aim to merge this week so it has some time in master before 1.0.

Conflicts:
	Apps/Sandcastle/gallery/3D Models.html
	Source/DataSources/EntityView.js
	Source/Scene/GlobeSurface.js
	Source/Scene/GlobeSurfaceTile.js
	Source/Scene/Scene.js
	Specs/Scene/GeometryRenderingSpec.js
Conflicts:
	Apps/Sandcastle/gallery/3D Models.html
	Apps/Sandcastle/gallery/Camera.html
	CHANGES.md
… screen until the camera height is low enough to pick terrain.
@pjcozzi
Copy link
Contributor

pjcozzi commented Jul 17, 2014

  • Run Viewer.
  • Zoom to Death Valley. Tilt for a horizon view.
  • Switch to height-map terrain.
  • Quickly switch to mesh terrain.

image

I can't reproduce this in master.

@pjcozzi
Copy link
Contributor

pjcozzi commented Jul 18, 2014

All critical fixes are in. @bagnell please write issues (and link them to the camera roadmap) for any outstanding issues that we should address later.

I'll have a another look at the code now.

return undefined;
}

//while(tile.state === QuadtreeTileLoadState.DONE) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we delete this?

pjcozzi added a commit that referenced this pull request Jul 18, 2014
@pjcozzi pjcozzi merged commit 9a320fc into master Jul 18, 2014
@pjcozzi pjcozzi deleted the camera-terrain branch July 18, 2014 15:21
@pjcozzi
Copy link
Contributor

pjcozzi commented Jul 18, 2014

Folks - let us know if you run into any significant issues in master with this...

@emackey
Copy link
Contributor

emackey commented Jul 18, 2014

This is a huge improvement to camera handling, great work on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants